home *** CD-ROM | disk | FTP | other *** search
- MT-NewsWatcher Apple Event support
- ----------------------------------
-
- This is preliminary documentation of MT-NewsWatcher's Apple Event support, which
- you can expect to become more comprehensive in future versions. Note that
- MT-NW also supports shared menus, so that applications like URL Manager Pro
- and Frontier can add a menu to MT-NW's menu bar.
-
- To see which events MT-NewsWatcher supports, use the "Open Dictionary" command
- in your script editor, and select the MT-NW application to open.
-
- If you are interested in futher Apple Event support, and have suggestions
- for events to support, please send them to me at <mailto:smfr@best.com>.
-
- Supported Apple Event suites
- ----------------------------
-
- Ñ Required suite
-
- MT-NewsWatcher supports the required Apple Event suite, which consists of
- events to open the application, open documents, print documents and quit.
- This suite is supported by most Macintosh applications.
-
- Ñ╩Get URL suite
-
- The URL suite is used for URL dispatching. MT-NewsWatcher can handle
- mailto: and news URLs.
-
- nntp: URLs are handled, but are being phased out and should not be used.
-
- news: URLs are handled, and take the form:
-
- news:groupname
- news:message-ID
- news://server/message-ID
- news://server/groupname/
-
- MT-NewWatcher can open single articles from another server (the 3rd form above),
- but cannot currently open a news group from a server that is not the one set in
- the preferences.
-
- mailto: URLs of the form
- <mailto:smfr@best.com?subject=MT%20NewsWatcher%20is%20cool&body=Hi%20there>
-
- are handled properly.
-
- MT-NewsWatcher dispatches URLs which are not nntp, news or mailto to the URL
- helpers as set in the preferences. It can also be configured to dispatch mailto:
- URLs to your preferred email application.
-
- Ñ╩YA-NewsWatcher suite
-
- As of version 2.4.4, MT-NW supports the YA-NewsWatcher Apple Event suite.
- This provides events to read the contents of article windows, and to
- read and write the contents of message windows. You cannot change read-only
- headers in message windows (e.g. from, references, message-ID etc.).
-
- The YA-NewsWatcher suite was first implemented in YA-NewsWatcher, by Brian Clark.
-
- getmessage: Get the text of a message (i.e. outgoing), specifying the header or body.
- getmessage
- messageField string -- The name of the header to return (e.g. ╥subject╙, ╥Date╙),
- or an empty string to return the body text.
- [windowName string] -- Name of the message window to get text from (or the top window)
- Result: string -- The requested text
-
- setmessage: Set the text for a header or the body of an open message window. This will
- replace existing text. You cannot set the text of non-editable headers.
- setmessage string -- The text to place in the body or header of the message window.
- This replaces any existing text.
- messageField string -- Name of the header to reply (defaults to body text).
- [windowName string] -- Name of the open window to act on (default to topmost message window)
-
- getarticle: Get the text of an open article window
- getarticle
- messageField string -- The name of the header for which to return data, or an empty
- string to return the body text.
- [windowName string] -- Name of the window to get text from. Defaults to the frontmost
- article window.
- Result: string -- The requested body or header text
-
- Some examples (copy and paste into Script Editor to run):
-
- -- get the subject of the frontmost article window
- tell application "MT-NewsWatcher 2.4.4"
- getarticle messageField "subject"
- end tell
-
- -- get the body text of the frontmost article window
- tell application "MT-NewsWatcher 2.4.4"
- getarticle messageField "body" -- can also use empty string to denoty body, or "full" for headers & body
- end tell
-
- -- get the body of a named article window
- tell application "MT-NewsWatcher 2.4.4"
- getarticle windowName "Re: System problem" messageField "body"
- end tell
-
- -- get the subject of the frontmost message window
- tell application "MT-NewsWatcher 2.4.4"
- getmessage messageField "subject"
- end tell
-
- -- set the Reply-To header of the frontmost message window
- tell application "MT-NewsWatcher 2.4.4"
- setmessage "my@email.address" messageField "reply-to"
- end tell
-
- -- append a news group to the newsgroups header
- tell application "MT-NewsWatcher 2.4.4"
- set currentGroups to getmessage messageField "newsgroups"
- setmessage currentGroups & ", alt.test" messageField "newsgroups"
- end tell
-
- The YA-NewsWatcher suite is used by a set of AppleScripts to improve interoperability with Eudora,
- called the Yadora package, by Andrew Starr. These can be used to copy an article directly to your
- Eudora inbox, and to make a nickname for the author of an article. The Yadora scripts are available
- at:
- http://www.ka.net/eudora/mac/macfiles/yadora.sit
-
-